<template>
  <div class="app">
      <div class="row">
        <div class="col-xs-offset-2 col-xs-8">
          <banner></banner>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2 col-xs-offset-2">
          <div class="list-group">
            <!-- vue中借助router-link实现路由的切换 -->
            <router-link replace to="/about" active-class="active"  class="list-group-item">About</router-link>
            <hr>
            <router-link replace to="/home" active-class="active"  class="list-group-item">Home</router-link>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="panel">
            <div class="panel-body">
              <!-- 制定组件呈现位置 -->
              <router-view></router-view>
            </div>
          </div>
        </div>
      </div>
  </div>
</template>

<script>
import banner from './components/banner'
    export default {
      name: 'App',
      components: {
        banner
      }
    }
</script>

<style>
  a {
    color: black;
    text-decoration: none;
  }
  .active {
    background: blue;
  }
</style>